fb66ffeb0932b1181781b66560ff59be463c9335,drools-core/src/main/java/org/drools/reteoo/AccumulateNode.java,AccumulateNode,retractObject,#InternalFactHandle#PropagationContext#InternalWorkingMemory#,296

Before Change


            final ReteTuple leftTuple = compositeTupleMatch.getTuple();
            leftTuple.removeMatch( handle );

            this.modifyTuple( leftTuple,
                              context,
                              workingMemory );
        }
    }

After Change


     *  If an object is retract, call modify tuple for each
     *  tuple match.
     */
    public void retractObject(final InternalFactHandle handle,
                              final PropagationContext context,
                              final InternalWorkingMemory workingMemory) {
        final BetaMemory memory = (BetaMemory) workingMemory.getNodeMemory( this );
        if ( !memory.getObjectMemory().remove( handle ) ) {
            return;
        }

        final Iterator it = memory.getTupleMemory().iterator();
        this.constraints.updateFromFactHandle( workingMemory,
                                               handle );
        for ( ReteTuple tuple = (ReteTuple) it.next(); tuple != null; tuple = (ReteTuple) it.next() ) {
            if ( this.constraints.isAllowedCachedRight( tuple ) ) {
                this.retractTuple( tuple,
                                   context,
                                   workingMemory );
                this.assertTuple( tuple,
                                  context,
                                  workingMemory );
            }
        }
    }